<?php if(!empty($lan_default)&& !empty($lan_to_translate)):?>
 <?php echo form_open('administrator/setting/translate/save') ?>
<table class="table table-striped table-bordered table-condensed">
    <thead>
        <tr>
            <th align="center"><?php echo $lan_default->lang_name?></th>
            <th align="center">
                <?php echo $lan_to_translate->lang_name ?>
            </th>
        </tr>
        </thead>
    <tr>
        <td>
            Tittle:
            <?php  $title = $this->_global->_unserialize($article->post_title);
                    echo isset($title[$this->session->userdata('lan')])?$title[$this->session->userdata('lan')]['post_title']:"Không tồn tại tiêu đề bài viết với ngôn ngữ hiện tại";
             ?>
        </td>
           
            <td align="center">
                <input type="text" name="title" id="title" value="<?php echo isset($title[$lan_to_translate->lang_code])?$title[$lan_to_translate->lang_code]['post_title']:"";?>" />
            </td> 
    </tr>
    <tr>
        <td>Description:
            <?php  $postdesc = $this->_global->_unserialize($article->post_desc);
                    echo $postdesc[$this->session->userdata('lan')]['post_desc'];
             ?>
        </td>
        <td align="center">
            <textarea class="ckeditor" name="post_desc" id="post_desc" class="large">
                <?php echo isset($postdesc[$lan_to_translate->lang_code])?$postdesc[$lan_to_translate->lang_code]['post_desc']:"";?>
            </textarea>
        </td>
    </tr>
    <tr>
        <td>Content:
        <?php  $postcontent = $this->_global->_unserialize($article->post_content);
                    echo isset($postcontent[$this->session->userdata('lan')])?$postcontent[$this->session->userdata('lan')]['post_content']:"Không tồn tại nội dung bài viết với ngôn ngữ hiện tại";
             ?>
        </td>
        <td align="center">
            <textarea class="ckeditor" name="content" id="content" class="large">
                <?php echo isset($postcontent[$lan_to_translate->lang_code])?$postcontent[$lan_to_translate->lang_code]['post_content']:"";?>
            </textarea>
        </td>
    </tr>
    <tr>
        <td>Seo title:
        <?php  $seotitle = $this->_global->_unserialize($article->seo_title);
                    echo $seotitle[$this->session->userdata('lan')]['seo_title'];
             ?>
        </td>
        <td align="center">
            <input type="text" name="seo_title" id="seo_title" value="<?php echo isset($seotitle[$lan_to_translate->lang_code])?$seotitle[$lan_to_translate->lang_code]['seo_title']:"";?>"/>
        </td>
    </tr>
</table>
<a href="<?php echo base_url().'/administrator/setting/translate/post/'?>" class="btn">Cancel</a>
<input type="submit" class="btn btn-prymary" value="Update" />
<input type="hidden" name="action"  value="<?php echo $action ?>" id="action" />
<input type="hidden" name="lang"  value="<?php echo $lang ?>" id="action" />
<input type="hidden" name="post_id"  value="<?php echo $article->post_id?>" id="post_id" />
 </form>
<?php else:?>
<?php redirect('administrator/setting/translate/post/');
    endif;
?>